

import User from '../views/index.vue'
import Navigation from '../views/navigation.vue'

import secIndex from '../views/secondIndex.vue'

import Customer from '../views/information/customerInfo.vue'
import Waiter from '../views/information/waiterInfo.vue'
import Address from '../views/information/addressInfo.vue'

import Product from '../views/product/productInfo'

import Order from '../views/order/orderInfo.vue'
import Comment from '../views/order/commentInfo.vue'

import teamInfo from '../views/about/teamInfo.vue'
import market from '../views/mapMarket'

import entrance from "../views/entrance";
import myAddress from "../views/customerPart/myAddress";
import myOrder from "../views/customerPart/myOrder";

export const userRouters = [
    {
        meta: {
            title:'首页',
            title2:'HOME'
        },
        path: '/index',
        name: 'index',
        component: Navigation,
        iconCls: 'el-icon-message',
    },

    {
        meta: {
            title: '用户信息管理',
            title2:'User Information'
        },
        path: '/information',
        redirect:'/information/customer',
        component: secIndex,
        name: 'UserInfo',
        iconCls: 'el-icon-message',
        children: [
            {
                meta: {
                    title: '顾客信息管理',
                    title2:'Customer Management'
                },
                path: '/information/customer',
                component: Customer,
                name: 'Customer',
                iconCls: 'el-icon-message',
            },
            {
                meta: {
                    title: '员工管理',
                    title2:'Employee Management'
                },
                path: '/information/waiter',
                component: Waiter,
                name: 'Waiter',
                iconCls: 'el-icon-message',
            },
            {
                meta: {
                    title: '配送地址管理',
                    title2:'Address Management'
                },
                path: '/information/address',
                component: Address,
                name: 'Address',
                iconCls: 'el-icon-message',
            },
        ]
    },

    {
        meta: {
            title: '订单信息管理',
            title2:'User Information'
        },
        path: '/order',
        redirect:'/order/info',
        component: secIndex,
        name: 'OrderInfo',
        iconCls: 'el-icon-message',
        children: [
            {
                meta: {
                    title: '订单信息管理',
                    title2:'Order Management'
                },
                path: '/order/info',
                component: Order,
                name: 'Order',
                iconCls: 'el-icon-message',
            },
            {
                meta: {
                    title: '评论管理',
                    title2:'Comment Management'
                },
                path: '/order/comment',
                component: Comment,
                name: 'Comment',
                iconCls: 'el-icon-message',
            }
        ]
    },

    {
        meta: {
            title: '商品管理',
            title2:'Product Management'
        },
        path: '/product/productInfo',
        component: Product,
        name: 'Product',
        iconCls: 'el-icon-message',
    },

    {
        meta: {
            title: '顾客入口',
            title2:'ABOUT'
        },
        path: '/about',
        redirect:'/about/teamInfo',
        component: secIndex,
        name: 'about',
        iconCls: 'el-icon-message',
        children: [
            {
                meta: {
                    title: '顾客入口',
                    title2:'TEAM INFO'
                },
                path: '/market/customer',
                component: market,
                name: 'teamInfo',
                iconCls: 'el-icon-message',
            },
        ]
    },
    {
        meta: {
            title: '我的订单',
            title2:'My Order'
        },
        path: '/customerPart/myorder',
        redirect:'/customerPart/myorder',
        component: secIndex,
        name: 'about',
        iconCls: 'el-icon-message',
        children: [
            {
                meta: {
                    title: '我的订单',
                    title2:'My Order'
                },
                path: '/customerPart/myorder',
                component: myOrder,
                name: 'My Order',
                iconCls: 'el-icon-message',
            },
        ]
    },
    {
        meta: {
            title: '我的地址',
            title2:'My Address'
        },
        path: '/customerPart/myaddress',
        redirect:'/customerPart/myaddress',
        component: secIndex,
        name: 'Address',
        iconCls: 'el-icon-message',
        children: [
            {
                meta: {
                    title: '我的地址',
                    title2:'My Address'
                },
                path: '/customerPart/myaddress',
                component: myAddress,
                name: 'My address',
                iconCls: 'el-icon-message',
            },
        ]
    }
];

export const userRouter = {
    path: '/',
    redirect: '/index',
    name: 'index',
    meta: {
        title: '首页',
        title2:'HOME'
    },
    component: User,
    children: userRouters
};

export const entranceRouter ={
    path: '/entrance',
    name: 'ooo',
    meta: {
        title: '首页',
        title2:'HOME'
    },
    component: entrance,
    children: [
        {
        meta: {
            title:'首页',
            title2:'HOME'
        },
        path: '/entrance',
        name: 'index',
        component: Navigation,
        iconCls: 'el-icon-message',
    }
    ]
};

export const managerRouter = {
        path: '/manager/manager',
        name: 'manager',
        meta: {
            title: '管理系统',
            title2:'HOME'
        },
        icon: 'fa fa-user-circle-o fa-lg',
        component:market,
    };


export const routers = [
    userRouter,//除个人中心外所有
    managerRouter,
    entranceRouter
];
